/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package general;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author isaias
 */
public class DatabaseManager {
    private static DatabaseManager instance = new DatabaseManager();

    public static DatabaseManager getInstance() {
        return instance;
    }
    private final EntityManagerFactory emf;

    private DatabaseManager() {
        emf = Persistence.createEntityManagerFactory("ProjectObraPU");
    }

    public EntityManager getEntityManager() {
        return emf.createEntityManager();
    }

     public void udpateDatabase() {
            System.out.println(">>>>>>>>>>>> udpateDatabase ");
     }

}
